From: Florian Müllner Date: Tue, 12 Feb 2019 10:07:55 +0000 (+0100) Subject: lint: Enforce consistent return X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~839^2^2~152 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2a041e9d8d1d8bd1f1d513c2b8095bbdb822f87b;p=gnome-shell.git lint: Enforce consistent return While all javascript functions have a return value - either an explicit one from a return statement, or an implicit "undefined" - mixing both in the same function is almost certainly an oversight, and more often than not a bug. Enable the corresponding eslint rule to catch those errors. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/635 --- diff --git a/lint/eslintrc-shell.json b/lint/eslintrc-shell.json index 9c4c96bba..d8a940bbb 100644 --- a/lint/eslintrc-shell.json +++ b/lint/eslintrc-shell.json @@ -7,6 +7,7 @@ "allow": ["^vfunc_", "^on_"] } ], + "consistent-return": "error", "key-spacing": [ "error", {